package cn.lx.log.autoconfigure;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author lX
 * @version JDK 8
 * @className LogPropertiesDetail (此处以class为例)
 * @date 2024/5/23
 * @description TODO
 */

public class LogPrintProperties {


    /**
     * 是否打印追踪ID
     * @return
     */
    private boolean printTraceID;

    /**
     * 是否打印请求时间
     * @return
     */
    private boolean prentRequestTime;

    /**
     * 是否打印请求URL
     * @return
     */
    private boolean printRequestUrl;

    /**
     * 是否打印请求URI
     * @return
     */
    private boolean printRequestUri;

    /**
     * 是否打印请求方式
     * @return
     */
    private boolean printRequestMethod;

    /**
     * 是否打印请求IP
     * @return
     */
    private boolean printClientIP;

    /**
     * 是否打印请求类
     * @return
     */
    private boolean clazz;

    /**
     * 是否打印请求方法
     * @return
     */
    private boolean classMethod;

    /**
     * 是否打印请求参数
     * @return
     */
    private boolean classRequestParams;

    /**
     * 是否打印请求耗时
     * @return
     */
    private boolean timeConsuming;

    /**
     * 是否打印请求目标
     * @return
     */
    private boolean callFrom;
    /**
     * 慢请求执行阈值
     * @return
     */
    private long slowThresholdMills;

    public LogPrintProperties() {
    }

    public boolean isPrintTraceID() {
        return printTraceID;
    }

    public void setPrintTraceID(boolean printTraceID) {
        this.printTraceID = printTraceID;
    }

    public boolean isPrentRequestTime() {
        return prentRequestTime;
    }

    public void setPrentRequestTime(boolean prentRequestTime) {
        this.prentRequestTime = prentRequestTime;
    }

    public boolean isPrintRequestUrl() {
        return printRequestUrl;
    }

    public void setPrintRequestUrl(boolean printRequestUrl) {
        this.printRequestUrl = printRequestUrl;
    }

    public boolean isPrintRequestUri() {
        return printRequestUri;
    }

    public void setPrintRequestUri(boolean printRequestUri) {
        this.printRequestUri = printRequestUri;
    }

    public boolean isPrintRequestMethod() {
        return printRequestMethod;
    }

    public void setPrintRequestMethod(boolean printRequestMethod) {
        this.printRequestMethod = printRequestMethod;
    }

    public boolean isPrintClientIP() {
        return printClientIP;
    }

    public void setPrintClientIP(boolean printClientIP) {
        this.printClientIP = printClientIP;
    }

    public boolean isClazz() {
        return clazz;
    }

    public void setClazz(boolean clazz) {
        this.clazz = clazz;
    }

    public boolean isClassMethod() {
        return classMethod;
    }

    public void setClassMethod(boolean classMethod) {
        this.classMethod = classMethod;
    }

    public boolean isClassRequestParams() {
        return classRequestParams;
    }

    public void setClassRequestParams(boolean classRequestParams) {
        this.classRequestParams = classRequestParams;
    }

    public boolean isTimeConsuming() {
        return timeConsuming;
    }

    public void setTimeConsuming(boolean timeConsuming) {
        this.timeConsuming = timeConsuming;
    }

    public boolean isCallFrom() {
        return callFrom;
    }

    public void setCallFrom(boolean callFrom) {
        this.callFrom = callFrom;
    }

    public long getSlowThresholdMills() {
        return slowThresholdMills;
    }

    public void setSlowThresholdMills(long slowThresholdMills) {
        this.slowThresholdMills = slowThresholdMills;
    }

    @Override
    public String toString() {
        return "LogPropertiesDetail{" +
                "printTraceID=" + printTraceID +
                ", prentRequestTime=" + prentRequestTime +
                ", printRequestUrl=" + printRequestUrl +
                ", printRequestUri=" + printRequestUri +
                ", printRequestMethod=" + printRequestMethod +
                ", printClientIP=" + printClientIP +
                ", clazz=" + clazz +
                ", classMethod=" + classMethod +
                ", classRequestParams=" + classRequestParams +
                ", timeConsuming=" + timeConsuming +
                ", callFrom=" + callFrom +
                ", slowThresholdMills=" + slowThresholdMills +
                '}';
    }
}
